using System;
using System.Collections.Generic;
using System.Text;

namespace tKitchen
{
    public class Meal_Recipe
    {
        int meal_RecipeId;
        Recipe recipe;

        #region Properties
        public int Meal_RecipeId
        {
            get { return meal_RecipeId; }
            set { meal_RecipeId = value; }
        }

        public Recipe Recipe
        {
            get { return recipe; }
            set { recipe = value; }
        }
        #endregion

        public Meal_Recipe()
        {
            meal_RecipeId = -1;
        }

        public Meal_Recipe(Meal_RecipePO poIn)
        {
            meal_RecipeId = poIn.Meal_RecipeId;
            if (poIn.Recipe != null)
            {
                this.Recipe = new Recipe(poIn.Recipe);
            }
            else
            {
                this.Recipe = null;
            }
        }

        public override string ToString()
        {
            return this.recipe.ToString();
        }


        internal Meal_Recipe Copy()
        {
            Meal_Recipe temp = new Meal_Recipe();
            temp.Meal_RecipeId = this.Meal_RecipeId;
            if (this.Recipe != null)
            {
                temp.Recipe = this.Recipe.Copy();
            }

            return temp;
        }

    }
}
